package com.woniu.controller;

import com.woniu.constant.HttpStatus;
import com.woniu.entity.PageData;
import com.woniu.entity.Result;
import com.woniu.service.InspectorService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("berthRecordsController")
public class BerthRecordsController {

    @Resource
    private InspectorService inspectorService;

    @ApiOperation("泊车管理")
    @GetMapping("/page")
    public Result berthRecords(String inspectorId,@RequestParam(value="roadName",required=false)String roadName,Integer currentPage,Integer pageSize){
        PageData pageData = inspectorService.findBerthRecords(inspectorId,roadName,currentPage,pageSize);
        return new Result(HttpStatus.SUCCESS,"查询成功",pageData);
    }

}
